﻿@model HomePageNewsItemsModel
@using SmartStore.Core.Domain.Catalog;
@using SmartStore.Core.Infrastructure;
@using SmartStore.Services.Catalog;
@using SmartStore.Web.Models.News;
@if (Model.NewsItems.Count > 0)
{
    <div class="block news-list-homepage">
        <div class="block-title clearfix">
            <a href="@Url.RouteUrl("NewsRSS", new { languageId = Model.WorkingLanguageId })" class="link-rss pull-right" title="@T("News.RSS.Hint")" rel="tooltip">
                <i class="icon-rss muted"></i>
                @T("News.RSS")
            </a>
            @T("News")
        </div>
        <div class="block-body news-items">
            @foreach (var item in Model.NewsItems)
            {
                <div class="news-item">
                    <h4 class="news-title clearfix">
                        <a class="news-title" href="@Url.RouteUrl("NewsItem", new { SeName = item.SeName })">
                            @item.Title
                        </a>
                        <span class="news-date muted pull-right">
                           @item.CreatedOn.ToString("D")
                        </span>
                    </h4>
                    <div class="news-details">
                        @Html.Raw(item.Short)
                    </div>
                    <a href="@Url.RouteUrl("NewsItem", new { SeName = item.SeName })" class="read-more">
                        @T("News.MoreInfo")
                    </a>
                </div>
            }
            <div class="view-all">
                <a href="@Url.RouteUrl("NewsArchive")">
                    @T("News.ViewAll")
                </a>
            </div>
        </div>
    </div>

}